package com.center.biz.impl;

import com.center.api.model.EduCourseNote;
import com.center.api.remote.RemoteEduCourseNoteService;
import com.center.biz.dao.EduCourseNoteMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduCourseNoteService.class)
public class RemoteEduCourseNoteServiceImpl implements RemoteEduCourseNoteService {

    @Autowired
    private EduCourseNoteMapper eduCourseNoteMapper;
    @Override
    public int save(EduCourseNote eduCourseNote) {
        return this.eduCourseNoteMapper.insertSelective(eduCourseNote);
    }

    @Override
    public int delete(int id) {
        return this.eduCourseNoteMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(EduCourseNote eduCourseNote) {
        return this.eduCourseNoteMapper.updateByPrimaryKeySelective(eduCourseNote);
    }

    @Override
    public EduCourseNote getById(int id) {
        return this.eduCourseNoteMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduCourseNote> select(EduCourseNote eduCourseNote) {
        return this.eduCourseNoteMapper.select(eduCourseNote);
    }
}
